<template>
  <div class="tips">
    <el-alert
      :title=tips
      type="info"
      class="tip">
    </el-alert>
  </div>
</template>

<script>
    export default {
        name: "QuestionTips",
        data(){
            return{
                tips:'',
            }
        },
        mounted(){
            this.getRandTip()
        },
        methods:{
            getRandTip(){
                this.axios.post("http://localhost:8081/cache/getRandTip").then(res=>{
                    this.tips = res.data
                }).catch(
                    exception=>{
                        console.log(exception)
                    }
                )
            },
        }
    }
</script>

<style scoped>
  .tips{
    width: 820px;
    transition: 0.3s;
    border-radius: 3px;
    letter-spacing: 1.5px;
  }
  .tips:hover{
    box-shadow: 0 0 6px #c2c2c2;
  }
  .tip{
    /*height: 60px;*/
  }
</style>

